package beans;

import java.io.InputStream;

public class MyOfferDisplay {
	private int offerId;
	private String title;
	private String description;
	private boolean isEvent;
	private double price;
	private boolean hasDiscount;
	private double discountPrice;
	private int initialAmount;
	private int amountLeft;
	private boolean isValid;
	
	private byte[] image;
	private InputStream is;
	//display strings
	private String strIsEvent;
	private String strHasDiscount;
	private String strIsValid;
	private String status;
	
	public MyOfferDisplay(String title, String description, boolean isEvent,
			double price, boolean hasDiscount, double discountPrice,
			int initialAmount, int amountLeft) {
		this.title = title;
		this.description = description;
		this.isEvent = isEvent;
		this.price = price;
		this.hasDiscount = hasDiscount;
		this.discountPrice = discountPrice;
		this.initialAmount = initialAmount;
		this.amountLeft = amountLeft;
	}
	public MyOfferDisplay() {
	}
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public String getDescription() {
		return description;
	}
	public void setDescription(String description) {
		this.description = description;
	}
	public boolean isEvent() {
		return isEvent;
	}
	public void setEvent(boolean isEvent) {
		this.isEvent = isEvent;
		if(isEvent)
		{
			strIsEvent = "Да";
		}
		else
		{
			strIsEvent = "Не";
		}
	}
	public double getPrice() {
		return price;
	}
	public void setPrice(double price) {
		this.price = price;
	}
	public boolean isHasDiscount() {
		return hasDiscount;
	}
	public void setHasDiscount(boolean hasDiscount) {
		this.hasDiscount = hasDiscount;
		if(hasDiscount)
		{
			strHasDiscount = "Да";
		}
		else
		{
			strHasDiscount = "Не";
		}
	}
	public double getDiscountPrice() {
		return discountPrice;
	}
	public void setDiscountPrice(double discountPrice) {
		this.discountPrice = discountPrice;
	}
	public int getInitialAmount() {
		return initialAmount;
	}
	public void setInitialAmount(int initialAmount) {
		this.initialAmount = initialAmount;
	}
	public int getAmountLeft() {
		return amountLeft;
	}
	public void setAmountLeft(int amountLeft) {
		this.amountLeft = amountLeft;
	}
	public boolean isValid() {
		return isValid;
	}
	public void setValid(boolean isValid) {
		this.isValid = isValid;
		if(isValid)
		{
			strIsValid = "Да";
		}
		else
		{
			strIsValid = "Не";
		}
	}
	public int getOfferId() {
		return offerId;
	}
	public void setOfferId(int offerId) {
		this.offerId = offerId;
	}
	public String getStrIsEvent() {
		return strIsEvent;
	}
	public void setStrIsEvent(String strIsEvent) {
		this.strIsEvent = strIsEvent;
	}
	public String getStrHasDiscount() {
		return strHasDiscount;
	}
	public void setStrHasDiscount(String strHasDiscount) {
		this.strHasDiscount = strHasDiscount;
	}
	public String getStrIsValid() {
		return strIsValid;
	}
	public void setStrIsValid(String strIsValid) {
		this.strIsValid = strIsValid;
	}
	public String getStatus() {
		return status;
	}
	public void setStatus(String status) {
		this.status = status;
	}
	public byte[] getImage() {
		return image;
	}
	public void setImage(byte[] image) {
		this.image = image;
	}
	public InputStream getIs() {
		return is;
	}
	public void setIs(InputStream is) {
		this.is = is;
	}
	
	
	
}
